<template>
  <b-col>
    <b-row class="p-3">
      <h4 style="font-family:HYZhengYuan-85S">
        发布的点评
      </h4>
    </b-row>
    <!-- 循环体 -->
    <b-row v-for="c in criticism.data" :key="c.id" class="mt-2 border-bottom pb-1">
      <b-col>
        <BangumiInfo :data="c" />
      </b-col>
    </b-row>
    <b-row v-if="criticism.data!=null && criticism.total <=5 && criticism.total >0">
      <b-col class="text-center pb-2" style="font-family:HYZhengYuan-55S">
        <h5>到底咯</h5>
      </b-col>
    </b-row>
    <b-row v-if="criticism.data!=null&&criticism.total ==0">
      <b-col class="text-center pb-2" style="font-family:HYZhengYuan-55S">
        <h5>暂无内容</h5>
      </b-col>
    </b-row>
  </b-col>
</template>
<script>
import BangumiInfo from './BangumiInfo';
export default {
  components: {
    BangumiInfo
  },
  props: {
    id: String
  },
  data() {
    return {
      criticism: {
        data: null
      },
    }
  },
  created() {
    this.update(this.id, 1);
  },
  methods: {
    //获取页面
    update(id, page) {
      this.$httpIssue.getUserCriticism(id, page).then((res) => {
        console.log(res);
        this.criticism = res;
      }).catch((err) => {
        console.log(err);
      });
    },

  },
}
</script>
<style scoped>
.content {
  display: -webkit-box;
  text-overflow: ellipsis;
  -webkit-line-clamp: 3; /* 要显示的行数 */
  -webkit-box-orient: vertical;
}
</style>
